<%@ Page language="c#" Codebehind="default.aspx.cs" AutoEventWireup="false" Inherits="SplendidCRM.html5.Default" %>
<!--
/*
 * This program is free software: you can redistribute it and/or modify it under the terms of the 
 * GNU Affero General Public License as published by the Free Software Foundation, either version 3 
 * of the License, or (at your option) any later version.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3, 
 * the Appropriate Legal Notices must display the following words on all interactive user interfaces: 
 * "Copyright (C) 2005-2011 SplendidCRM Software, Inc. All rights reserved."
 */
-->
<html id="htmlRoot" runat="server">
<head runat="server">
<title><%# L10n.Term(".LBL_BROWSER_TITLE") %></title>
<meta name="apple-mobile-web-app-capable"          content="yes"   Visible='<%# Request.UserAgent.Contains("iPad;") %>' runat="server" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" Visible='<%# Request.UserAgent.Contains("iPad;") %>' runat="server" />
<link type="text/css" rel="stylesheet" href="../App_Themes/Six/style.css" />
<link type="text/css" rel="stylesheet" href="jQuery/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="jQuery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="jQuery/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript" src="jQuery/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="JSON.js"></script>
<script type="text/javascript" src="Math.uuid.js"></script>
<script type="text/javascript" src="utility.js"></script>
<script type="text/javascript" src="sha1.js"></script>
<script type="text/javascript" src="SplendidScripts/SplendidStorage.js"></script>
<script type="text/javascript" src="SplendidScripts/Credentials.js"></script>
<script type="text/javascript" src="SplendidScripts/SplendidRequest.js"></script>
<script type="text/javascript" src="SplendidScripts/SplendidCache.js"></script>
<script type="text/javascript" src="SplendidScripts/Application.js"></script>
<script type="text/javascript" src="SplendidScripts/Login.js"></script>
<script type="text/javascript" src="SplendidScripts/Logout.js"></script>
<script type="text/javascript" src="SplendidScripts/Terminology.js"></script>
<script type="text/javascript" src="SplendidScripts/DetailViewRelationships.js"></script>
<script type="text/javascript" src="SplendidScripts/TabMenu.js"></script>
<script type="text/javascript" src="SplendidScripts/ListView.js"></script>
<script type="text/javascript" src="SplendidScripts/DetailView.js"></script>
<script type="text/javascript" src="SplendidScripts/EditView.js"></script>
<script type="text/javascript" src="SplendidScripts/DynamicButtons.js"></script>
<script type="text/javascript" src="SplendidScripts/ModuleUpdate.js"></script>
<script type="text/javascript" src="SplendidScripts/AutoComplete.js"></script>
<script type="text/javascript" src="SplendidScripts/Options.js"></script>

<script type="text/javascript" src="SplendidUI/chrome.js"></script>
<script type="text/javascript" src="SplendidUI/SplendidErrorUI.js"></script>
<script type="text/javascript" src="SplendidUI/SearchBuilder.js"></script>
<script type="text/javascript" src="SplendidUI/Sql.js"></script>
<script type="text/javascript" src="SplendidUI/Crm.js"></script>
<script type="text/javascript" src="SplendidUI/Formatting.js"></script>
<script type="text/javascript" src="SplendidUI/TerminologyUI.js"></script>
<script type="text/javascript" src="SplendidUI/TabMenuUI.js"></script>
<script type="text/javascript" src="SplendidUI/ListViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/PopupViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/DetailViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/EditViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/SearchViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/SplendidInitUI.js"></script>
<script type="text/javascript" src="SplendidUI/DynamicButtonsUI.js"></script>
<script type="text/javascript" src="SplendidUI/SelectionUI.js"></script>
<script type="text/javascript" src="SplendidUI/LoginViewUI.js"></script>
<script type="text/javascript" src="SplendidUI/ArchiveEmailUI.js"></script>
<script type="text/javascript">
function NetworkStatusChanged()
{
	var divHeader = document.getElementById('divHeader');
	divHeader.style.backgroundColor = bIS_OFFLINE ? '#efefef' : '#ffd14e';
	var divHeader_divOnlineStatus = document.getElementById('divHeader_divOnlineStatus');
	divHeader_divOnlineStatus.innerHTML =  bIS_OFFLINE ? L10n.Term('.LBL_OFFLINE') : L10n.Term('.LBL_ONLINE');
	
	var sLayoutPanel  = 'divMainLayoutPanel';
	var sActionsPanel = 'divMainActionsPanel';
	LoginViewUI_UpdateHeader(sLayoutPanel, sActionsPanel, true);
}

function ShowSystemLog()
{
	var $dialog = $('<div id="divSystemLog" style="white-space: nowrap;"></div>');
	$dialog.dialog(
	{
		  modal    : true
		, position : top
		, resizable: (navigator.userAgent.indexOf('iPad') > 0 ? false : true)
		, width    : $(window).width()  - 60
		, height   : (navigator.userAgent.indexOf('iPad') > 0 ? 'auto' : $(window).height() - 60)
		, minHeight: $(window).height() - 60
		, title    : 'System Log'
		, create   : function(event, ui)
		{
			var divSystemLog = document.getElementById('divSystemLog');
			if ( navigator.userAgent.indexOf('iPad') > 0 )
			{
				divSystemLog.style.height = 'auto';
			}
			divSystemLog.innerHTML = '<table border=0 cellpadding=2 cellspacing=0><tr><td>' + SplendidError.arrErrorLog.join('</td></tr><tr><td>\n') + '</td></tr></table>';
		}
		, close    : function(event, ui)
		{
			$dialog.dialog('destroy');
			// 10/17/2011 Paul.  We have to remove the new HTML, otherwise there will be multiple definitions for divPopupLayoutPanel. 
			var divSystemLog = document.getElementById('divSystemLog');
			divSystemLog.parentNode.removeChild(divSystemLog);
		}
	});
}

function ShowSplendidStorage()
{
	var $dialog = $('<div id="divSplendidStorage" style="white-space: nowrap;"></div>');
	$dialog.dialog(
	{
		  modal    : true
		, position : top
		, resizable: (navigator.userAgent.indexOf('iPad') > 0 ? false : true)
		, width    : $(window).width()  - 60
		, height   : (navigator.userAgent.indexOf('iPad') > 0 ? 'auto' : $(window).height() - 60)
		, minHeight: $(window).height() - 60
		, title    : 'Splendid Storage'
		, create   : function(event, ui)
		{
			var nTotalSize = 0;
			var arrKeys = new Array();
			var bgPage = chrome.extension.getBackgroundPage();
			bgPage.SplendidStorage.foreach(function(status, key, value)
			{
				if ( status == 1 )
				{
					nTotalSize += key.length + value.length;
					arrKeys.push('<td valign="top">' + value.length.toString() + '</td><td>' + key + '</td>');
				}
				else if ( status == 0 )
				{
					var divSplendidStorage = document.getElementById('divSplendidStorage');
					if ( navigator.userAgent.indexOf('iPad') > 0 )
					{
						divSplendidStorage.style.height = 'auto';
					}
					divSplendidStorage.innerHTML = '<table border=0 cellpadding=2 cellspacing=0><tr>' + arrKeys.join('</tr><tr>\n') + '<tr><td colspan=2><br />\n' 
						+ nTotalSize.toString() + ' characters ' + (SplendidStorage.db == null ? 'localStorage' : 'Web SQL storage') 
						+ ' <input id="SplendidStorage_btnClear" type="submit" value="' + L10n.Term('.LBL_CLEAR_BUTTON_LABEL') + '" class="button" />'
						+ '</td></tr></table>';
					
					var btnClear = document.getElementById('SplendidStorage_btnClear');
					btnClear.onclick = function()
					{
						LoginViewUI_ClearModuleLists(function(status, message)
						{
							$dialog.dialog('destroy');
							var divSplendidStorage = document.getElementById('divSplendidStorage');
							divSplendidStorage.parentNode.removeChild(divSplendidStorage);
						});
					}
				}
				else if ( status == -1 )
				{
					var divSplendidStorage = document.getElementById('divSplendidStorage');
					divSplendidStorage.innerHTML = key;
				}
			});
		}
		, close    : function(event, ui)
		{
			$dialog.dialog('destroy');
			// 10/17/2011 Paul.  We have to remove the new HTML, otherwise there will be multiple definitions for divPopupLayoutPanel. 
			var divSplendidStorage = document.getElementById('divSplendidStorage');
			divSplendidStorage.parentNode.removeChild(divSplendidStorage);
		}
	});
}

var bCacheAllModulesBusy = false;

function CacheAllModuleItems_Next(sMODULE_NAME, arrIDS, callback)
{
	try
	{
		if ( bCacheAllModulesBusy && arrIDS.length > 0 )
		{
			var sID = arrIDS.pop();
			var bgPage = chrome.extension.getBackgroundPage();
			bgPage.DetailView_LoadItem(sMODULE_NAME, sID, function(status, message)
			{
				if ( status == 1 )
				{
					var row = message;
					callback(2, 'Loaded ' + sMODULE_NAME + ': ' + row['NAME']);
					CacheAllModuleItems_Next(sMODULE_NAME, arrIDS, callback);
				}
				else
				{
					callback(status, message);
				}
			});
		}
		else
		{
			callback(1, '');
		}
	}
	catch(e)
	{
		callback(-1, SplendidError.FormatError(e, 'CacheAllModuleItems_Next'));
	}
}

function CacheAllModules_Next(arrMODULE_NAMES)
{
	try
	{
		if ( bCacheAllModulesBusy && arrMODULE_NAMES.length > 0 )
		{
			var sMODULE_NAME = arrMODULE_NAMES.pop();
			SplendidError.SystemMessage('Loading ' + sMODULE_NAME);
			
			var sGRID_NAME = sMODULE_NAME + '.ListView' + sPLATFORM_LAYOUT;
			var bgPage = chrome.extension.getBackgroundPage();
			bgPage.ListView_LoadLayout(sGRID_NAME, function(status, message)
			{
				if ( status == 1 )
				{
					var layout = message;
					var sSELECT_FIELDS = ListViewUI_GridColumns(layout);
					var sLIST_VIEW_SORT_FIELD       = 'NAME';
					var sLIST_VIEW_SORT_DIRECTION   = 'asc';
					var sLIST_VIEW_SEARCH_FILTER    = '';
					bgPage.ListView_LoadModule(sMODULE_NAME, sLIST_VIEW_SORT_FIELD, sLIST_VIEW_SORT_DIRECTION, sSELECT_FIELDS, sLIST_VIEW_SEARCH_FILTER, function(status, message)
					{
						if ( status == 1 )
						{
							var rows = message;
							var arrIDS = new Array();
							for ( var i = 0; i < rows.length; i++ )
							{
								var row = rows[i];
								arrIDS.push(row['ID']);
							}
							CacheAllModuleItems_Next(sMODULE_NAME, arrIDS, function(status, message)
							{
								if ( status == 1 )
								{
									CacheAllModules_Next(arrMODULE_NAMES);
								}
								else
								{
									SplendidError.SystemMessage(message);
								}
							});
						}
						else
						{
							SplendidError.SystemMessage(message);
						}
					});
				}
			});
		}
		else
		{
			SplendidError.SystemMessage('');
			var lnkHeaderCacheAll = document.getElementById('lnkHeaderCacheAll');
			lnkHeaderCacheAll.innerHTML = L10n.Term('.LBL_CACHE_ALL');
			bCacheAllModulesBusy = false;
		}
	}
	catch(e)
	{
		SplendidError.SystemMessage(SplendidError.FormatError(e, 'CacheModule_Next'));
	}
}

function CacheAllModules()
{
	try
	{
		if ( bCacheAllModulesBusy )
		{
			bCacheAllModulesBusy = false;
			var lnkHeaderCacheAll = document.getElementById('lnkHeaderCacheAll');
			lnkHeaderCacheAll.innerHTML = L10n.Term('.LBL_CACHE_ALL');
		}
		else if ( !bIS_OFFLINE && confirm(L10n.Term('.NTC_DELETE_CONFIRMATION')) )
		{
			var lnkHeaderCacheAll = document.getElementById('lnkHeaderCacheAll');
			lnkHeaderCacheAll.innerHTML = L10n.Term('.LBL_STOP_CACHING');
			bCacheAllModulesBusy = true;
			
			var sDETAIL_NAME = 'TabMenu' + sPLATFORM_LAYOUT;
			var bgPage = chrome.extension.getBackgroundPage();
			bgPage.DetailViewRelationships_LoadLayout(sDETAIL_NAME, function(status, message)
			{
				if ( status == 1 )
				{
					var arrDetailViewRelationship = message;
					bgPage.TabMenu_Load(function(status, message)
					{
						if ( status == 1 )
						{
							try
							{
								var result = message;
								var arrMODULE_NAMES = new Array();
								for ( var i = 0; i < result.length; i++ )
								{
									var sMODULE_NAME = result[i].MODULE_NAME;
									if ( DetailViewRelationshipExists(arrDetailViewRelationship, sMODULE_NAME) )
									{
										arrMODULE_NAMES.push(sMODULE_NAME);
									}
								}
								CacheAllModules_Next(arrMODULE_NAMES);
							}
							catch(e)
							{
								SplendidError.SystemError(e, 'CacheAllModules');
							}
						}
					});
				}
			});
		}
	}
	catch(e)
	{
		SplendidError.SystemError(e, 'CacheAllModules');
	}
}

function LoadSplendid()
{
	try
	{
		SplendidError.divError = document.getElementById('lblError');
		
		sPRODUCT_TITLE    = 'SplendidCRM <%# Application["CONFIG.service_level"] %>';
		sREMOTE_SERVER    = '<%# Request.Url.Scheme + "://" + Request.Url.Host + Sql.ToString(Application["rootURL"]) %>';
		sIMAGE_SERVER     = '../';
		sPLATFORM_LAYOUT  = '';
		sAUTHENTICATION   = '<%# Security.IsWindowsAuthentication() || Security.IsAuthenticated() ? "Windows" : "CRM" %>';
		bWINDOWS_AUTH     = <%# Security.IsWindowsAuthentication() ? "true" : "false" %>;
		bIS_OFFLINE       = false;
		bENABLE_OFFLINE   = (window.XMLHttpRequest !== undefined);
		sUSER_ID          = '<%# Security.USER_ID   %>';
		sUSER_NAME        = '<%# Security.USER_NAME %>';
		sTEAM_ID          = '<%# Security.TEAM_ID   %>';
		sTEAM_NAME        = '<%# Security.TEAM_NAME %>';
		sUSER_LANG        = '<%# L10n.NAME          %>';
		sUSER_DATE_FORMAT = '<%# Session["USER_SETTINGS/DATEFORMAT"] %>';
		sUSER_TIME_FORMAT = '<%# Session["USER_SETTINGS/TIMEFORMAT"] %>';
		sPASSWORD         = '';
		SplendidStorage.maxDatabase = <%# Sql.ToInteger(Application["CONFIG.html5.max_database"]) %>;
		cbNetworkStatusChanged = NetworkStatusChanged;
		
		Terminology_SetTerm(''     , 'NTC_LOGIN_MESSAGE'     , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], ".NTC_LOGIN_MESSAGE"          )) %>');
		Terminology_SetTerm(''     , 'LBL_ENABLE_OFFLINE'    , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], ".LBL_ENABLE_OFFLINE"         )) %>');
		Terminology_SetTerm(''     , 'LBL_ONLINE'            , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], ".LBL_ONLINE"                 )) %>');
		Terminology_SetTerm(''     , 'LBL_OFFLINE'           , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], ".LBL_OFFLINE"                )) %>');
		Terminology_SetTerm(''     , 'LBL_CACHE_SELECTED'    , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], ".LBL_CACHE_SELECTED"         )) %>');
		Terminology_SetTerm('Users', 'LBL_USER_NAME'         , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], "Users.LBL_USER_NAME"         )) %>');
		Terminology_SetTerm('Users', 'LBL_PASSWORD'          , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], "Users.LBL_PASSWORD"          )) %>');
		Terminology_SetTerm('Users', 'LBL_LOGIN_BUTTON_LABEL', '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], "Users.LBL_LOGIN_BUTTON_LABEL")) %>');
		Terminology_SetTerm('Users', 'LBL_ERROR'             , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], "Users.LBL_ERROR"             )) %>');
		Terminology_SetTerm('Users', 'ERR_INVALID_PASSWORD'  , '<%# Sql.EscapeJavaScript(L10N.Term(Application, Request["HTTP_ACCEPT_LANGUAGE"], "Users.ERR_INVALID_PASSWORD"  )) %>');
		
		var sLayoutPanel  = 'divMainLayoutPanel';
		var sActionsPanel = 'divMainActionsPanel';
		var bgPage = chrome.extension.getBackgroundPage();
		bgPage.SplendidStorage.Init(function(status, message)
		{
			bgPage.IsOnline(function(status, message)
			{
				var divHeader_divOnlineStatus = document.getElementById('divHeader_divOnlineStatus');
				if ( status == 1 )
				{
					// 09/28/2011 Paul.  Site is online. 
					divHeader_divOnlineStatus.innerHTML = L10n.Term('.LBL_ONLINE');
					bIS_OFFLINE = false;
				}
				else if ( status == 0 )
				{
					// 09/28/2011 Paul.  Site is offline. 
					divHeader_divOnlineStatus.innerHTML = L10n.Term('.LBL_OFFLINE');
					bIS_OFFLINE = true;
				}
				else if ( status < 0 )
				{
					SplendidError.SystemMessage(message);
					divHeader_divOnlineStatus.innerHTML = L10n.Term('Users.LBL_ERROR');
					bIS_OFFLINE = true;
				}
				bgPage.IsAuthenticated(function(status, message)
				{
					try
					{
						if ( status == 1 )
						{
							var rowDefaultSearch = null;
							SplendidUI_Init(sLayoutPanel, sActionsPanel, sSTARTUP_MODULE, rowDefaultSearch, function(status, message)
							{
								// 10/10/2011 Paul.  Once the globals have been loaded, we can update the header. 
								if ( status == 3 )
								{
									var lnkHeaderCacheAll        = document.getElementById('lnkHeaderCacheAll'       );
									var lnkHeaderSystemLog       = document.getElementById('lnkHeaderSystemLog'      );
									var lnkHeaderSplendidStorage = document.getElementById('lnkHeaderSplendidStorage');
									lnkHeaderCacheAll.innerHTML        = L10n.Term('.LBL_CACHE_ALL'       );
									lnkHeaderSystemLog.innerHTML       = L10n.Term('.LBL_SYSTEM_LOG'      );
									lnkHeaderSplendidStorage.innerHTML = L10n.Term('.LBL_SPLENDID_STORAGE');
									LoginViewUI_UpdateHeader(sLayoutPanel, sActionsPanel, true)
								}
								else if ( status == 1 )
								{
									SplendidError.SystemMessage('');
								}
								else
								{
									SplendidError.SystemMessage(message);
								}
							});
						}
						else if ( status == 0 )
						{
							ShowOptionsDialog();
						}
						else
						{
							SplendidError.SystemMessage(message);
						}
					}
					catch(e)
					{
						SplendidError.SystemError(e, 'default.html IsAuthenticated()');
					}
				});
			});
		});
	}
	catch(e)
	{
		SplendidError.SystemError(e, 'default.html onload()');
	}
}

window.onload = function()
{
	SplendidError.divError = document.getElementById('lblError');

	<%# Sql.ToBoolean(Request["debug"]) ? "LoadSplendid();" : String.Empty %>
	if ( window.applicationCache !== undefined )
	{
		try
		{
			var nManifestProgress = 1;
			
			window.applicationCache.addEventListener('cached', LoadSplendid, false);
			window.applicationCache.addEventListener('cached', function()
			{
				SplendidError.SystemMessage('manifest cached');
			}, false);
			
			window.applicationCache.addEventListener('noupdate', LoadSplendid, false);
			window.applicationCache.addEventListener('noupdate', function()
			{
				SplendidError.SystemMessage('manifest noupdate');
			}, false);
			
			window.applicationCache.addEventListener('obsolete', LoadSplendid, false);
			window.applicationCache.addEventListener('obsolete', function()
			{
				SplendidError.SystemMessage('manifest obsolete');
			}, false);
			
			window.applicationCache.addEventListener('checking', function()
			{
				SplendidError.SystemMessage('manifest checking');
			}, false);
			
			window.applicationCache.addEventListener('downloading', function()
			{
				SplendidError.SystemMessage('manifest downloading');
			}, false);
			
			window.applicationCache.addEventListener('progress', function()
			{
				SplendidError.SystemMessage('manifest progress ' + nManifestProgress);
				nManifestProgress++;
			}, false);
			
			window.applicationCache.addEventListener('error', LoadSplendid, false);
			window.applicationCache.addEventListener('error', function()
			{
				SplendidError.SystemMessage('manifest error');
			}, false);
			
			// 09/27/2011 Paul.  updateready does not always fire as document. 
			// https://developer.mozilla.org/en/Offline_resources_in_Firefox
			window.applicationCache.addEventListener('updateready', function(e)
			{
				SplendidError.SystemMessage('manifest update ready ');
				// 10/16/2011 Paul.  An easier alternative to swapCache() is just to reload the entire page at a time suitable for the user, using location.reload().
				// http://www.whatwg.org/specs/web-apps/current-work/#applicationcache
				//window.applicationCache.swapCache();
				//window.onload = LoadSplendid;
				// Even after swapping the cache the currently loaded page won't use it until it is reloaded, so force a reload so it is current.
				//window.location.reload(true);
				Reload();
			}, false);
		}
		catch(e)
		{
			alert('default.aspx onload ' + e.message);
		}
	}
	else
	{
		LoadSplendid();
	}
}

function Reload()
{
	try
	{
		window.location.href = 'default.aspx?' + Math.uuid();
	}
	catch(e)
	{
		alert(e.message);
	}
}

</script>
</head>
<body>
<table id="divHeader" border="0" cellpadding="0" cellspacing="0" width="100%" style=" background-color: #ffd14e">
	<tr>
		<td>
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td width="50%" valign="top">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
							<tr>
								<td width="207">
									<a href="javascript:void(0);" onclick="Reload();">
									<img id="divHeader_imgCompanyLogo" src="../Include/images/SplendidCRM_Logo.gif" alt="SplendidCRM" width="207" height="60" border="0" />
									</a>
								</td>
								<td>
									<div id="lblError" class="error"></div>
								</td>
							</tr>
						</table>
					</td>
					<td width="50%" valign="top">
						<table border="0" cellpadding="2" cellspacing="0" width="100%">
							<tr>
								<td valign="top">
									<div id="divHeader_OfflineCache" style="vertical-align: top; height: 60px; overflow-y: scroll; width: 100%;"></div>
								</td>
								<td align="right" class="myArea" nowrap="nowrap" style="padding-right: 10px;" width="220">
									<div id="divHeader_divAuthenticated" class="welcome" style="display:none">
										<span id="divHeader_spnWelcome"></span>&nbsp;
										<b><span id="divHeader_spnUserName"></span></b>
										<span id="divHeader_spnLogout">
											&nbsp;[&nbsp;<a id="divHeader_lnkLogout" href='javascript:void(0);' class="myAreaLink"></a>&nbsp;]
										</span>
									</div>
									<div id="divHeader_divOnlineStatus" class="welcome"></div>
									<div id="divHeader_divSystemLog" style="white-space: nowrap">
										<a id="lnkHeaderSystemLog" href="javascript:void(0);" onclick="ShowSystemLog()" class="welcome">System Log</a>
									</div>
									<div id="divHeader_divSplendidStorage">
										<a id="lnkHeaderCacheAll"  href="javascript:void(0);" onclick="CacheAllModules()" class="welcome">Cache All</a>
										&nbsp;&nbsp;
										<a id="lnkHeaderSplendidStorage" href="javascript:void(0);" onclick="ShowSplendidStorage()" class="welcome">Splendid Storage</a>
									</div>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr bgcolor="white">
		<td>
			<div id="ctlTabMenu"></div>
			
			<div style="padding-left: 10px; padding-right: 10px; padding-bottom: 5px;">
				<div id="divMainLayoutPanel_Header"></div>
				
				<div id="divMainActionsPanel"></div>
				
				<div id="divMainLayoutPanel"></div>
			</div>
		</td>
	</tr>
</table>
</body>
</html>

